<?php
    include_once '../../../../controlador/php/conexion/Conexion10.php';
    $con = new Conexion10();

    $medi = "SELECT USUNOMBRE, USUDESCRI FROM DGempres10..GENMEDICO
            INNER JOIN DGempres10..GENESPMED ON GENESPMED.MEDICOS = GENMEDICO.OID 
            INNER JOIN DGempres10..GENESPECI ON GENESPMED.ESPECIALIDADES = GENESPECI.OID
            INNER JOIN DGempres10..GENUSUARIO ON GENMEDICO.GENUSUARIO = GENUSUARIO.OID
            WHERE NOT USUDESCRI like '%NO USAR%' AND
            GEEDESCRI LIKE '%pediatr%'
            AND USUESTADO='1' 
            ORDER BY USUDESCRI";
    $lstm = $con->query($medi);
    while($lstm2 = mssql_fetch_array($lstm)){
        $lst[] = array_map('utf8_encode', $lstm2 );
    }
    $con->cerrarConexion();
    print_r(json_encode($lst));
?>
